﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MODEL
{
    public partial class qgzx_company
    {
        #region 纯的实体对象 + ToPOCO()
        /// <summary>
        /// 纯的实体对象
        /// </summary>
        /// <returns></returns>
        public qgzx_company ToPOCO()
        {
            qgzx_company poco = new qgzx_company()
            {
                CompanyId = this.CompanyId,
                CompanyName = this.CompanyName,
                CompanyCode = this.CompanyCode,
                CompanyType = this.CompanyType,
                CompanyField = this.CompanyField,
                CompanyAddress = this.CompanyAddress,
                CompanyPhone = this.CompanyPhone,
                Comtact = this.Comtact,
                ContactPhone = this.ContactPhone,
                CompanyIntro = this.CompanyIntro,
                LoginName = this.LoginName,
                IsAudit = this.IsAudit,
                LoginPassword = this.LoginPassword,
                IsBlackList = this.IsBlackList,
                AuditReason =AuditReason,
                AuditTime = this.AuditTime,
                BusinessLicense=this.BusinessLicense
            };
            return poco;
        }
        #endregion

        #region 1.0 生成 TViewModel 实体对象 +ToViewModel
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public ViewModel.Company ToViewModel()
        {
            ViewModel.Company poco = new ViewModel.Company()
            {
                CompanyId = this.CompanyId,
                CompanyName = this.CompanyName,
                CompanyCode = this.CompanyCode,
                CompanyType = this.CompanyType,
                CompanyField = this.CompanyField,
                CompanyAddress = this.CompanyAddress,
                CompanyPhone = this.CompanyPhone,
                Comtact = this.Comtact,
                ContactPhone = this.ContactPhone,
                CompanyIntro = this.CompanyIntro,
                LoginName = this.LoginName,
                IsAudit = this.IsAudit,
                LoginPassword = this.LoginPassword,
                IsBlackList = this.IsBlackList,
                AuditReason = AuditReason,
                AuditTime = this.AuditTime,
                BusinessLicense=this.BusinessLicense
            };
            return poco;
        }
        #endregion
    }
}
